<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
    xmlns:s="http://jboss.com/products/seam/taglib"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:rich="http://richfaces.org/rich"
    template="layout/template.xhtml">

<ui:define name="body">

    <rich:panel>
        <f:facet name="header">Sevk Details</f:facet>

			<rich:layout>
              	<rich:layoutPanel position="left">

        <s:decorate id="sira" template="layout/display.xhtml">
            <ui:define name="label">Sira</ui:define>
            <h:outputText value="#{sevkHome.instance.sira}"/>
        </s:decorate>

        <s:decorate id="seri" template="layout/display.xhtml">
            <ui:define name="label">Seri</ui:define>
            <h:outputText value="#{sevkHome.instance.seri}"/>
        </s:decorate>

        <s:decorate id="irsaliyeno" template="layout/display.xhtml">
            <ui:define name="label">Irsaliyeno</ui:define>
            <h:outputText value="#{sevkHome.instance.irsaliyeno}"/>
        </s:decorate>

        <s:decorate id="irsaliyeTarihi" template="layout/display.xhtml">
            <ui:define name="label">Irsaliye tarihi</ui:define>
            <h:outputText value="#{sevkHome.instance.irsaliyeTarihi}">
                <s:convertDateTime type="date" dateStyle="short"/>
            </h:outputText>
        </s:decorate>

        <s:decorate id="sevkTarihi" template="layout/display.xhtml">
            <ui:define name="label">Sevk tarihi</ui:define>
            <h:outputText value="#{sevkHome.instance.sevkTarihi}">
                <s:convertDateTime type="date" dateStyle="short"/>
            </h:outputText>
        </s:decorate>

			</rich:layoutPanel>
			
			<rich:layoutPanel position="center">


        <s:decorate id="teslimalanadsoyad" template="layout/display.xhtml">
            <ui:define name="label">T.A. Ad Soyad</ui:define>
            <h:outputText value="#{sevkHome.instance.teslimalanadsoyad}"/>
        </s:decorate>

        <s:decorate id="teslimedenadsoyad" template="layout/display.xhtml">
            <ui:define name="label">T.E. Ad Soyad</ui:define>
            <h:outputText value="#{sevkHome.instance.teslimedenadsoyad}"/>
        </s:decorate>

        <s:decorate id="plaka" template="layout/display.xhtml">
            <ui:define name="label">Plaka</ui:define>
            <h:outputText value="#{sevkHome.instance.plaka}"/>
        </s:decorate>

        <s:decorate id="ehliyetno" template="layout/display.xhtml">
            <ui:define name="label">Ehliyetno</ui:define>
            <h:outputText value="#{sevkHome.instance.ehliyetno}"/>
        </s:decorate>

        <s:decorate id="ruhsatno" template="layout/display.xhtml">
            <ui:define name="label">Ruhsatno</ui:define>
            <h:outputText value="#{sevkHome.instance.ruhsatno}"/>
        </s:decorate>

        
        	</rich:layoutPanel>
        </rich:layout>

        <div style="clear:both"/>

    </rich:panel>

    <div class="actionButtons">

        <s:button view="/SevkEdit.xhtml"
                    id="edit"
                 value="Edit"/>

        <s:button view="/#{empty sevkFrom ? 'SevkList' : sevkFrom}.xhtml"
                    id="done"
                 value="Done"/>

    </div>

    <rich:tabPanel switchType="ajax">

    <rich:tab>
        <f:facet name="label">
            <h:panelGroup><h:graphicImage value="/img/onetomany.gif" style="vertical-align: middle; padding-right: 4px;"/>Isemirharekets</h:panelGroup>
        </f:facet>
    <h:form styleClass="association" id="isemirhareketsChildren">

        <h:outputText value="There are no isemirharekets associated with this sevk."
                   rendered="#{empty sevkHome.isemirharekets}"/>

        <rich:dataTable value="#{sevkHome.isemirharekets}"
                       var="_isemirhareket"
                  rendered="#{not empty sevkHome.isemirharekets}"
                rowClasses="rvgRowOne,rvgRowTwo"
                        id="isemirhareketsTable">
            <rich:column sortBy="#{_isemirhareket.id}">
                <f:facet name="header">Id</f:facet>
                <h:outputText value="#{_isemirhareket.id}"/>
            </rich:column>

                <rich:column sortBy="#{_isemirhareket.isemirByIsemirid.isemirno}">
                    <f:facet name="header">İş Emir No</f:facet>
                    <h:outputText value="#{_isemirhareket.isemirByIsemirid.isemirno}"/>
                </rich:column>
                
                <rich:column sortBy="#{_isemirhareket.harekettur.ad}">
                    <f:facet name="header">Hareket Turu</f:facet>
                    <h:outputText value="#{_isemirhareket.harekettur.ad}"/>
                </rich:column>
                
                <rich:column sortBy="#{_isemirhareket.isemirByVirmanisemirid.isemirno}">
                    <f:facet name="header">Virman İş Emir No</f:facet>
                    <h:outputText value="#{_isemirhareket.isemirByVirmanisemirid.isemirno}"/>
                </rich:column>
                
                <rich:column sortBy="#{_isemirhareket.isemirurun.urun.urunno}">
                    <f:facet name="header">Ürün</f:facet>
                    <h:outputText value="#{_isemirhareket.isemirurun.urun.urunno}-#{_isemirhareket.isemirurun.urun.adi}"/>
                </rich:column>
                
                <rich:column sortBy="#{_isemirhareket.isemirmalzeme.malzeme.kod}">
                    <f:facet name="header">Malzeme</f:facet>
                    <h:outputText value="#{_isemirhareket.isemirmalzeme.malzeme.kod}-#{_isemirhareket.isemirmalzeme.malzeme.ad}"/>
                </rich:column>            
            
            <rich:column sortBy="#{_isemirhareket.miktar}">
                <f:facet name="header">Miktar</f:facet>
                <h:outputText value="#{_isemirhareket.miktar}"/>
            </rich:column>
            <h:column>
                <f:facet name="header">Action</f:facet>
                <s:link id="selectisemirhareket"
                     value="Select"
                      view="/Isemirhareket.xhtml">
                    <f:param name="isemirhareketId"
                            value="#{_isemirhareket.id}"/>
                    <f:param name="isemirhareketFrom" value="Sevk"/>
                </s:link>
            </h:column>
        </rich:dataTable>

    </h:form>

    <div class="actionButtons">
        <s:button
               value="Add isemirhareket"
                view="/IsemirhareketEdit.xhtml">
            <f:param name="sevkId"
                    value="#{sevkHome.instance.id}"/>
            <f:param name="isemirhareketFrom" value="Sevk"/>
        </s:button>
    </div>
    </rich:tab>
</rich:tabPanel>
</ui:define>

</ui:composition>
